<%-- 
    Document   : user3tier
    Created on : 2019-9-9, 10:02:10
    Author     : danny
--%>

<%@page import="edu.fjs.liyq.entity.User"%>
<%@page import="java.util.List"%>
<%@page import="edu.fjs.liyq.service.impl.UserServiceImpl"%>
<%@page import="edu.fjs.liyq.service.UserService"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    UserService service = new UserServiceImpl();
    List<User> ul = service.getAll();
    pageContext.setAttribute("ul", ul);
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <table>
            <tr>
                <th>账号</th>
                <th>真实姓名</th>
                <th>性别</th>
            </tr>
            <c:forEach items="${ul}" var="u">
                <tr>
                    <td>${u.account}</td>
                    <td>${u.name}</td>
                    <td>${u.sex}</td>
                </tr>
            </c:forEach>
        </table>
    </body>
</html>
